<!DOCTYPE html>
<html >
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1" />
	<!--响应式布局，宽度等于设备宽度-->
	<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
	<title>实验云</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="css/head.css">
	<link rel="stylesheet" type="text/css" href="css/mycourse.css">
	<script type="text/javascript" src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
	<!--[if lt IE 9]>
    <script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
	<!--[endif]-->
	<script type="text/javascript" src="js/jquery-1.10.0.js"></script>
	<script type="text/javascript" src="js/bootstrap.min.js"></script>
	<script type="text/javascript" src="js/artTemplate.js"></script>
	<script type="text/javascript" src="js/template-native.js"></script>
	<script type="text/javascript" src="layer/layer.js"></script>
	<script type="text/javascript" src="js/HOST.js"></script>
	<script type="text/javascript" src="js/main.js"></script>
</head>
<body>
	<div class="menu">
		<div class="container con_header">
			<nav class="navbar" role="navigation">
			    <div class="container-fluid">
				    <div class="navbar-header">
				        <button type="button" class="navbar-toggle" data-toggle="collapse"
				                data-target="#cloud-navbar-collapse">
				            <span class="sr-only">切换导航</span>
				            <span class="icon-bar"></span>
				            <span class="icon-bar"></span>
				            <span class="icon-bar"></span>
				        </button>
				        <div style="width: 40px; height: 40px;">
                        	<a class="navbar-brand" href="index.html">
                            	<img src="img/logo.png" style="width: 40px; height: 40px;">
                        	</a>
                    	</div>
				    </div>
				    <div class="collapse navbar-collapse" id="cloud-navbar-collapse">
				        <ul class="nav navbar-nav">
				            <li class="hov"><a href="courseLibrary.html">课程库</a></li>
				            <li class="hov"><a href="scrachPro.html">Scratch作品展</a></li>
							<li class="hov"><a href="scratch/ide.html">Scratch 3.0 在线编程</a></li>
							<li class="hov"><a href="personalMain.html">个人总览</a></li>
				            <li class="active hov"><a href="myCourse.html">我的课程</a></li>
							<li class="hov"><a href="virtualLab.html">虚拟实验室</a></li>
							<div class="mobile-show">
				            	<li><a href="personalCenter.html">个人信息</a></li>
	            				<li><a href="javascript:;" onclick="logOut()">退出登录</a></li>
				            </div>
				            <li class="dropdown head-box">
				            	<a href="#" class="head-pic" data-toggle="dropdown">
				            		<img id="userImg" src="img/head_pic.png">
				            		<span id="userName">编程云</span>
				            	</a>
				            	<ul class="dropdown-menu">
				            		<li><a href="personalCenter.html">个人信息</a></li>
				            		<li><a href="javascript:;" onclick="logOut()">退出登录</a></li>
				            	</ul>
				            </li>
				        </ul>
				    </div>
			    </div>
			</nav>
		</div>
	</div>
	<div class="main">
		<div class="container">
			<div class="row">
				<p class="main-tit col-md-2 col-xs-4">我的课程</p>
			</div>
			<div class="row">
				<a href="courseLibrary.html"><div class="col-md-3 col-xs-6 courseBox">
					<img src="img/add_course.png" class="courseImg">
				</div></a>
				<div id="show1">
				</div>
			</div>
			<script id="learning" type="text/html">
				<% for (var i = 0; i < value.length; i ++) { %>
				<a href="#" data-id=<%= value[i].id %> data-title=<%= value[i].title %> data-desc=<%= value[i].desc %> data-classify=<%= value[i].classify %> data-classTime=<%= value[i].classtime %> data-score=<%= value[i].score %> data-createTime=<%= value[i].createTime %> data-createBy=<%= value[i].createBy %> data-pic=<%= value[i].pic %> data-view=<%= value[i].view %> data-focus=<%= value[i].focus %> onclick="courseDetail('<%= value[i].id %>')">
					<div class="col-md-3 col-xs-6 courseBox">
						<div class="courseMain">
                            <% if (value[i].pic != "") { %>
                            <img src=<%= value[i].pic %> class="courseImg">
                            <% } %>
                            <% if (value[i].pic == "") { %>
                            <img src="img/course.png" class="courseImg">
                            <% } %>
							<div class="zhezhao">
								<p class="courseName"><%=value[i].title%></p>
								<p class="courseLong"><span><%=value[i].classtime%>课时</span><span><%=value[i].score%>学分</span></p>
								<div class="checkD">查看详情</div>
							</div>
						</div>
					</div>
				</a>
				<% } %>
			</script>
		</div>
		<div class="container">
			<div class="row">
				<p class="main-tit col-md-2 col-xs-4">已完成课程</p>
			</div>
			<div class="row" id="show2" style="padding-left: 15px;">

			</div>
			<script id="finished" type="text/html">
				<% for (var i = 0; i < value.length; i ++) { %>
				<a href="#" data-id=<%= value[i].id %> data-title=<%= value[i].title %> data-desc=<%= value[i].desc %> data-classify=<%= value[i].classify %> data-classTime=<%= value[i].classtime %> data-score=<%= value[i].score %> data-createTime=<%= value[i].createTime %> data-createBy=<%= value[i].createBy %> data-pic=<%= value[i].pic %> data-view=<%= value[i].view %> data-focus=<%= value[i].focus %> onclick="courseDetail('<%= value[i].id %>')">
					<div class="col-md-3 col-xs-6 courseBox">
						<div class="courseMain">
                            <% if (value[i].pic != "") { %>

                            <img src=<%= value[i].pic %> class="courseImg">
                            <% } %>
                            <% if (value[i].pic == "") { %>


                            <img src="img/course.png" class="courseImg">

                            <% } %>
							<div class="zhezhao">
								<p class="courseName"><%=value[i].title%></p>
								<p class="courseLong"><span><%=value[i].classtime%>课时</span><span><%=value[i].score%>学分</span></p>
								<div class="checkD">查看详情</div>
							</div>
						</div>
					</div>
				</a>
				<% } %>
			</script>
		</div>
	</div>
	<div class="footer">
		<div class="container">
			<ul>
				<li class="footer-tit">联系与反馈</li>
				<li><a href="#">联系我们</a></li>
				<li><a href="#">意见反馈</a></li>
			</ul>
			<ul>
				<li class="footer-tit">资源共享</li>
				<li><a href="#">学校支持</a></li>
				<li><a href="#">文章干货</a></li>
				<li><a href="#">相关下载</a></li>
			</ul>
			<ul>
				<li class="footer-tit">关注我们</li>
				<li><a href="#">微信公众号</a></li>
				<li><a href="#">QQ群</a></li>
			</ul>
		</div>
	</div>
	<script>
		$(document).ready(function () {
			myCourseOnLearning();
			myCourseHasFinished();
			courseImgs();
		});
		$(window).resize(function () {
			courseImgs();
		});
		function courseDetail(id){
//			var courseid=$(id).data("id");//课程id
//			var title=$(id).data("title");
//			var desc=$(id).data("desc");
//			var overview=$(id).data("overview");
//			var classify=$(id).data("classify");
//			var classTime=$(id).data("classTime");
//			var score=$(id).data("score");
//			var createTime=$(id).data("createTime");
//			var createBy=$(id).data("createBy");
//			var pic=$(id).data("pic");
//			var view=$(id).data("view");
//			var focus=$(id).data("focus");
//			setCookie('courseid',courseid);
//			setCookie('title',title);
//			setCookie('desc',desc);
//			setCookie('overview',overview);
//			setCookie('classify',classify);
//			setCookie('classTime',classTime);
//			setCookie('score',score);
//			setCookie('createTime',createTime);
//			setCookie('createBy',createBy);
//			setCookie('pic',pic);
//			setCookie('view',view);
//			setCookie('focus',focus);
//			window.open("courseDetail.html?c="+id);
			window.location.href = "courseDetail.html?c=" + id;
//			window.location.href = "courseDetail.html?courseId=" + id;
		}
	</script>
</body>
</html>